# -*- coding: utf-8 -*-
"""
main
2025/9/8
@author: zhangzida
"""
import pytest,os,allure

if __name__ == '__main__':
    pytest.main(['./baidu.py','-s','--clean-alluredir','--alluredir=./report'])
    os.system('allure generate ./report -o ./html --clean')
# if __name__ == '__main__':
#     # 统一放在 allure-results/logs 下
#     allure_results = "./report/allure-results"
#     os.makedirs(f"{allure_results}/logs", exist_ok=True)

#     pytest.main([
#         "./baidu.py",
#         "-s",
#         f"--alluredir={allure_results}",
#     ])

#     # 生成最终 HTML 报告
#     os.system(f"allure generate {allure_results} -o ./report/allure-report --clean")
#     print("\n报告已生成，浏览器打开: allure open ./report/allure-report")